package demo.trans.vo;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import org.hibernate.annotations.GenericGenerator;
import org.jweb.core.bean.BaseVO;
import org.jweb.core.bean.annotation.Mapping;

import demo.entity.AnalyzeTradeEntity;

/**
 * @Title: Entity
 * @Description: 交易所分类
 * @author zhangdaihao
 * @date 2015-11-21
 * @version V1.0
 *
 */
@Mapping(entityClass=AnalyzeTradeEntity.class)
public class AnalyzeTradeVo extends BaseVO{
	/** id */
	@Mapping
	private java.lang.String id;
	/** 交易所名称 */
	@Mapping
	private java.lang.String tradeName;
	/** 交易品种名称（关联解盘房间 ） */
	@Mapping
	private java.lang.String tradeCategory;
	/** 房间id 对应交易品种 */
	@Mapping
	private java.lang.String roomId;
	
	// 子节点
	@Mapping
	private AnalyzeTradeVo parentCategory;
	
	/** 有效状态 */
	@Mapping
	private java.lang.String status;
	
	/** delflag */
	private java.lang.String delflag;
	/** delDate */
	private java.lang.String delDate;

	private List<AnalyzeTradeVo> analyzeCategorys = new ArrayList<AnalyzeTradeVo>();
	
	/**
	 * 方法: 取得java.lang.String
	 *
	 * @return: java.lang.String id
	 */

	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name = "ID", nullable = false, length = 32)
	public java.lang.String getId() {
		return this.id;
	}

	/**
	 * 方法: 设置java.lang.String
	 *
	 * @param: java.lang.String id
	 */
	public void setId(java.lang.String id) {
		this.id = id;
	}
	
	/**
	 * 方法: 取得java.lang.String
	 *
	 * @return: java.lang.String createBy
	 */
	@Column(name = "TRADE_NAME", nullable = true, length = 32)
	public java.lang.String getTradeName() {
		return this.tradeName;
	}

	/**
	 * 方法: 设置java.lang.String
	 *
	 * @param: java.lang.String createBy
	 */
	public void setTradeName(java.lang.String tradeName) {
		this.tradeName = tradeName;
	}
	
	/**
	 * 方法: 取得java.lang.String
	 *
	 * @return: java.lang.String createBy
	 */
	@Column(name = "TRADE_CATEGORY", nullable = true, length = 32)
	public java.lang.String getTradeCategory() {
		return this.tradeCategory;
	}

	/**
	 * 方法: 设置java.lang.String
	 *
	 * @param: java.lang.String createBy
	 */
	public void setTradeCategory(java.lang.String tradeCategory) {
		this.tradeCategory = tradeCategory;
	}
	
	@Column(name = "ROOM_ID", nullable = true, length = 32)
	public java.lang.String getRoomId() {
		return roomId;
	}

	public void setRoomId(java.lang.String roomId) {
		this.roomId = roomId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARENT_CATEGORY_ID")
	public AnalyzeTradeVo getParentCategory() {
		return parentCategory;
	}

	public void setParentCategory(AnalyzeTradeVo parentCategory) {
		this.parentCategory = parentCategory;
	}

	/**
	 * 方法: 取得java.lang.String
	 *
	 * @return: java.lang.String 有效状态
	 */
	@Column(name = "STATUS", nullable = true, length = 2)
	public java.lang.String getStatus() {
		return this.status;
	}

	/**
	 * 方法: 设置java.lang.String
	 *
	 * @param: java.lang.String 有效状态
	 */
	public void setStatus(java.lang.String status) {
		this.status = status;
	}

	/**
	 * 方法: 取得java.lang.String
	 *
	 * @return: java.lang.String delflag
	 */
	@Column(name = "DELFLAG", nullable = true, length = 2)
	public java.lang.String getDelflag() {
		return this.delflag;
	}

	/**
	 * 方法: 设置java.lang.String
	 *
	 * @param: java.lang.String delflag
	 */
	public void setDelflag(java.lang.String delflag) {
		this.delflag = delflag;
	}

	/**
	 * 方法: 取得java.lang.String
	 *
	 * @return: java.lang.String delDate
	 */
	@Column(name = "DEL_DATE", nullable = true, length = 32)
	public java.lang.String getDelDate() {
		return this.delDate;
	}

	/**
	 * 方法: 设置java.lang.String
	 *
	 * @param: java.lang.String delDate
	 */
	public void setDelDate(java.lang.String delDate) {
		this.delDate = delDate;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "parentCategory")
	public List<AnalyzeTradeVo> getAnalyzeCategorys() {
		return analyzeCategorys;
	}

	public void setAnalyzeCategorys(List<AnalyzeTradeVo> analyzeCategorys) {
		this.analyzeCategorys = analyzeCategorys;
	}
	
}
